This work is directed toward providing better rehabilitation for people suffering from somatosensory loss and paralysis due to spinal cord injury, head trauma or stroke. The goal of this project is to demonstrate that information suitable for controlling prosthetic devices, for modulating functional electrical stimulation of muscle, and for providing a sense of touch and position from areas of the body suffering sensory loss can be extracted, on line and in real time, from recordings of sensory activity in peripheral nerves. This will be done by developing software which digitizes action potentials from multiunit recordings of peripheral nerve activity made with implanted intrafascicular electrodes; creates templates of the measured characteristics for identified single units; generates a decision tree which allows rapid assignment of an action potential to one of the templates or to an "not identified" category; and measures the distribution of activity among the set of identified units from recordings made during natural stimulation. Once this is completed, a prototype hardware system that can perform this analysis on line in real time will be built. While the thrust of this work is directed toward developing a microprocessor based instrument capable of providing sensory feedback for controlling movement of hands and limbs in paralyzed patients or for controlling stimulation of intact sensory systems to provide proprioceptive and tactile sensations from insensate regions, such a system will/would also be useful in research on the encoding and processing of sensory information by the nervous system.